package base.core.api;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.time.LocalDateTime;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Description
 * @Author Pengwei
 * @CreatDate 2022/1/8 15:57
 */
@Data
@Accessors(chain = true)
public class BaseEntity {

    @Schema(description = "创建者")
    @TableField(fill = FieldFill.INSERT)
    private Integer createUserId;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "修改者")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer updateUserId;

    @Schema(description = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "删除标记")
    @TableLogic
    @JsonIgnore
    private Boolean delFlag;
}

